-
Notifications
You must be signed in to change notification settings - Fork 0
feat(scraper): add scraping status dashboard #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…endered static content that doesn't embed client side input
chenxin-yan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! looking look with things to consider
| const REFRESH_INTERVAL = 30000; // 30 sec | ||
| const ITEMS_PER_PAGE = 12; | ||
| // goes inside <script> tags | ||
| const scriptContent = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not ideal and elegant to have large js code as string like this. you could move it to a separate js file and run it as service worker on user's browser. I haven't look into how to do it with cloudflare workers and hono. You can look Into it.
Also, currently we are long polling data from the database which is also not ideal. You should look into cloudflare durable object to use web socket for real time update instead of long polling. Let me know if you need any help with it
|
to answer some of your questions:
its totally up to you. Looks good so far.
you can just ignore auth for now, as there is no sensitive info displayed in the dashboard and dashboard is purly presentational. it should be fine.
Its up to you
as I suggested in code review, checkout durable object and we can have a web socket connection to provide real time update instead of long polling
you can safely make this assumption as we will not delete any job, and when creating error record the job must exists
imo, we shouldn’t delete any error record just for monitoring/debugging purposes. e.g. checking how much retries did a given job take to succeed and the error details and whatnot.
Yes, cilent side filtering is good for this case.
It's up to you. Feel free to hold off on this for now. |
7072356 to
503ca3f
Compare
…, just committing so I don't lose the code.
4740be5 to
25e00d9
Compare
551a188 to
78a92a9
Compare
Closes #38
📌 What’s Changed
Screen.Recording.2025-10-13.at.12.32.51.AM-2.mp4
✅ Actions
📝 Notes for Reviewer
To run:
navigate to scraper directory
bun run db:generate
bun run db:migrate:local
bun run seed (this seeds ur local db w the generated data)
bun run dev
go to the wrangler:info url in terminal
Questions / issues
Notes on assumptions: